<div class="business-toolbar clearfix">
	<div class="sub-title">{{model.name}}</div>
	<div class="pl20 pr10">
		<div class="config-iprepair-controls-right pull-right">
			<button  class="btn btn-primary business-type-marign business-button-cover" {{action "scvDownload"}}  ><span download="交易类型.csv">导出</span></button>
		</div>
		<div class="pull-left pr-part">
			{{view view.daterangepicker
					id="dateRangePicker"
					defaultDate=pinTimePoint
					clickTimePoint="timePointChange"
					startDate = startDate
					endDate = endDate
					position = "right"
					timeRanges="timeRangesChange"
					class=""
				}}
		</div>
		<div class="pull-left pr-part">
			{{input class="input span3" value=keyWord id="mouseKeyUp" placeholder="关键字"}}
		</div>
	</div>
</div>

<div class="apm-gridcontainer">
	{{view view.Grid
		columns=perfColumns
		content=errorcodes
		pageIndex=pageIndex
		allowPaging=true
		pageSize=pageSize
		totalRows=totalRows
		allowSorting=true
		sorted="gridSorted"
		cellClicked="gridCellClicked"
		pageIndexChanged="pageIndexChanged"
		class="business-grid-white-space"}}
</div>

{{#view view.Dialog
	id="businessNodeDetailErrorcodeStackDialog"
	class="node-error-stack"
	title="错误明细"
	autoOpen=false
	modal=true
	width=800
	height=600
	buttons=dialogButtons}}

	<div class="control-group error-uri">
		{{curError.uri}}
	</div>
	<div class="control-group error-info">
		<table class="apm-table">
			<tr>
				<td>
					<div class="title">第一次发生时间</div>
					<div>{{curError._formatted_firstTime}}</div>
				</td>
				<td>
					<div class="title">最后一次出现时间</div>
					<div>{{curError._formatted_lastTime}}</div>
				</td>
				<td>
					<div class="title">发生次数</div>
					<div>{{curError.repeatCount}}</div>
				</td>
			</tr>
		</table>
	</div>
	<div class="control-group stack-index">
		<table class="apm-table">
			<tr>
				<td>
					<i class="icon-step-backward" {{action "gotoErrorStack" "first"}}></i>
					<i class="icon-chevron-left" {{action "gotoErrorStack" "-1"}}></i>
				</td>
				<td>
					<div class="title">最近{{curErrorStack._index}}次</div>
					<div>发生时间：{{curErrorStack._formattedTime}}</div>
				</td>
				<td>
					<i class="icon-chevron-right" {{action "gotoErrorStack" "+1"}}></i>
					<i class="icon-step-forward" {{action "gotoErrorStack" "last"}}></i>
				</td>
			</tr>
		</table>
	</div>
	<div class="control-group stack-errormsg">
		<h5>错误信息</h5>
		{{curErrorStack.errorMessage}}
	</div>
	<div class="control-group stack-header">
		<h5>原始信息</h5>
		<table class="apm-table">
			{{#each curErrorStack.fields as |field|}}
			<tr>
				<td class="name">{{field.name}}</td>
				<td class="value">{{field.value}}</td>
			</tr>
			{{/each}}
		</table>
	</div>
{{/view}}

{{#view view.Dialog
	id="set_trade"
	title="设置交易类型"
	class="hide"
	width=300
	height=250
	autoOpen=false
	modal=true
	resizable=false}}
	<div id="dialog"> 
		<div {{bind-attr class=":alert alertType formTip::hide"}}><strong>{{formTip}}</strong></div>
		<div class="control-group">
			<label class="business-nodedetail-trade-label">类型名称</label>
			<div class="controls">
				{{input class="input" tooltip="" value=tradeUri  disabled="disabled"}}
			</div>
		</div>
		<div class="control-group">
			<label class="business-nodedetail-trade-label">Apdex T</label>
			<div class="controls">
				{{input class="input" tooltip="" value=apdex_t}}（秒）
			</div>
		</div> 

		<div class="control-group" style="text-align:center;">
			<div>
				<button type="submit" {{action "setTrade"}} class="btn btn-primary">保存</button>
				<button type="button" {{action "closeDialog"}} class="btn btn-primary">取消</button>
			</div>
		</div>
	</div>
{{/view}}

{{view view.ThresholdConfig
	id="businessConfigThresholdView"
	targetResource="节点"
	isShowSystem=false
	alarmTime=alarmTimeSlot
	alwaysBusiness=true
	appId=business.id}}